<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>RaftLib: poolschedule.hpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">RaftLib
   &#160;<span id="projectnumber">0.3a</span>
   </div>
   <div id="projectbrief">C++ Stream Processing Template Library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">poolschedule.hpp</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef _POOLSSCHEDULE_HPP_</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define _POOLSSCHEDULE_HPP_  1</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &lt;set&gt;</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &lt;thread&gt;</span></div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;cstdint&gt;</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;schedule.hpp&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;kernelcontainer.hpp&quot;</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="keyword">class </span><a class="code" href="class_map.html">Map</a>;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespaceraft.html">raft</a>{</div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;   <span class="keyword">class </span>kernel;</div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;}</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classpool__schedule.html">   40</a></span>&#160;<span class="keyword">class </span><a class="code" href="classpool__schedule.html">pool_schedule</a> : <span class="keyword">public</span> <a class="code" href="class_schedule.html">Schedule</a></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;   <a class="code" href="classpool__schedule.html#a11da62ac9c7b4ea203198ac3bb7babb4">pool_schedule</a>( <a class="code" href="class_map.html">Map</a> &amp;map );</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;   <span class="keyword">virtual</span> <a class="code" href="classpool__schedule.html#a176ca5ea8ee742192b52660ecccc9290">~pool_schedule</a>();</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classpool__schedule.html#ab67558a44404e42ba032f799c0f424a7">start</a>(); </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;   </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;   <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classpool__schedule.html#aa5ec97e860a94aa17f33a0562fe942ce">scheduleKernel</a>( <a class="code" href="classraft_1_1kernel.html">raft::kernel</a> * <span class="keyword">const</span> kernel );</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">bool</span>  <a class="code" href="classpool__schedule.html#a962f811570635fb9a9ec13c1bbcf2923">container_min_input</a>( <a class="code" href="classkernel__container.html">kernel_container</a> * <span class="keyword">const</span> a,</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;                                     <a class="code" href="classkernel__container.html">kernel_container</a> * <span class="keyword">const</span> b );</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;   <span class="keyword">static</span> <span class="keywordtype">bool</span>  <a class="code" href="classpool__schedule.html#a9cef61efbff4cd4f0b2834fa1d8448cd">container_min_output</a>( <a class="code" href="classkernel__container.html">kernel_container</a> * <span class="keyword">const</span> a,</div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;                                      <a class="code" href="classkernel__container.html">kernel_container</a> * <span class="keyword">const</span> b );</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;</div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div>
<div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="classpool__schedule.html#ad58df45d8f29a1a696338a2beb058b7c">  101</a></span>&#160;   <span class="keyword">const</span> <span class="keywordtype">float</span> <a class="code" href="classpool__schedule.html#ad58df45d8f29a1a696338a2beb058b7c">diff_weight</a> = .20;</div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classpool__schedule.html#adc11766f8ff9a29b21318bfcf81c815d">  105</a></span>&#160;   <span class="keyword">const</span> decltype( std::thread::hardware_concurrency() )    <a class="code" href="classpool__schedule.html#adc11766f8ff9a29b21318bfcf81c815d">n_threads</a>;</div>
<div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classpool__schedule.html#ae13c48902fd23d0d8747978780731a04">  109</a></span>&#160;   <a class="code" href="namespacestd.html">std</a>::vector&lt; <a class="code" href="namespacestd.html">std</a>::thread* &gt;      <a class="code" href="classpool__schedule.html#ae13c48902fd23d0d8747978780731a04">pool</a>;</div>
<div class="line"><a name="l00113"></a><span class="lineno"><a class="line" href="classpool__schedule.html#a06a6ffb1893da4d486e309f22fe3d83e">  113</a></span>&#160;   <a class="code" href="namespacestd.html">std</a>::vector&lt; <a class="code" href="classkernel__container.html">kernel_container</a>* &gt; <a class="code" href="classpool__schedule.html#a06a6ffb1893da4d486e309f22fe3d83e">container</a>;</div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;   <a class="code" href="namespacestd.html">std</a>::<span class="keywordtype">size_t</span>                      kernel_count = 0;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;   <a class="code" href="namespacestd.html">std</a>::remove_reference&lt; decltype( container.end() ) &gt;::type container_it;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;};</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* END _POOLSSCHEDULE_HPP_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="classpool__schedule_html_a176ca5ea8ee742192b52660ecccc9290"><div class="ttname"><a href="classpool__schedule.html#a176ca5ea8ee742192b52660ecccc9290">pool_schedule::~pool_schedule</a></div><div class="ttdeci">virtual ~pool_schedule()</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:50</div></div>
<div class="ttc" id="classpool__schedule_html_ab67558a44404e42ba032f799c0f424a7"><div class="ttname"><a href="classpool__schedule.html#ab67558a44404e42ba032f799c0f424a7">pool_schedule::start</a></div><div class="ttdeci">virtual void start()</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:89</div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="classpool__schedule_html_adc11766f8ff9a29b21318bfcf81c815d"><div class="ttname"><a href="classpool__schedule.html#adc11766f8ff9a29b21318bfcf81c815d">pool_schedule::n_threads</a></div><div class="ttdeci">decltype(std::thread::hardware_concurrency()) const n_threads</div><div class="ttdef"><b>Definition:</b> poolschedule.hpp:105</div></div>
<div class="ttc" id="classpool__schedule_html_a9cef61efbff4cd4f0b2834fa1d8448cd"><div class="ttname"><a href="classpool__schedule.html#a9cef61efbff4cd4f0b2834fa1d8448cd">pool_schedule::container_min_output</a></div><div class="ttdeci">static bool container_min_output(kernel_container *const a, kernel_container *const b)</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:158</div></div>
<div class="ttc" id="classpool__schedule_html_a11da62ac9c7b4ea203198ac3bb7babb4"><div class="ttname"><a href="classpool__schedule.html#a11da62ac9c7b4ea203198ac3bb7babb4">pool_schedule::pool_schedule</a></div><div class="ttdeci">pool_schedule(Map &amp;map)</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:34</div></div>
<div class="ttc" id="classpool__schedule_html_ad58df45d8f29a1a696338a2beb058b7c"><div class="ttname"><a href="classpool__schedule.html#ad58df45d8f29a1a696338a2beb058b7c">pool_schedule::diff_weight</a></div><div class="ttdeci">const float diff_weight</div><div class="ttdef"><b>Definition:</b> poolschedule.hpp:101</div></div>
<div class="ttc" id="classpool__schedule_html_a06a6ffb1893da4d486e309f22fe3d83e"><div class="ttname"><a href="classpool__schedule.html#a06a6ffb1893da4d486e309f22fe3d83e">pool_schedule::container</a></div><div class="ttdeci">std::vector&lt; kernel_container * &gt; container</div><div class="ttdef"><b>Definition:</b> poolschedule.hpp:113</div></div>
<div class="ttc" id="classpool__schedule_html_a962f811570635fb9a9ec13c1bbcf2923"><div class="ttname"><a href="classpool__schedule.html#a962f811570635fb9a9ec13c1bbcf2923">pool_schedule::container_min_input</a></div><div class="ttdeci">static bool container_min_input(kernel_container *const a, kernel_container *const b)</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:151</div></div>
<div class="ttc" id="class_map_html"><div class="ttname"><a href="class_map.html">Map</a></div><div class="ttdef"><b>Definition:</b> map.hpp:47</div></div>
<div class="ttc" id="classpool__schedule_html_ae13c48902fd23d0d8747978780731a04"><div class="ttname"><a href="classpool__schedule.html#ae13c48902fd23d0d8747978780731a04">pool_schedule::pool</a></div><div class="ttdeci">std::vector&lt; std::thread * &gt; pool</div><div class="ttdef"><b>Definition:</b> poolschedule.hpp:109</div></div>
<div class="ttc" id="class_schedule_html"><div class="ttname"><a href="class_schedule.html">Schedule</a></div><div class="ttdef"><b>Definition:</b> schedule.hpp:34</div></div>
<div class="ttc" id="classraft_1_1kernel_html"><div class="ttname"><a href="classraft_1_1kernel.html">raft::kernel</a></div><div class="ttdef"><b>Definition:</b> kernel.hpp:57</div></div>
<div class="ttc" id="classpool__schedule_html_aa5ec97e860a94aa17f33a0562fe942ce"><div class="ttname"><a href="classpool__schedule.html#aa5ec97e860a94aa17f33a0562fe942ce">pool_schedule::scheduleKernel</a></div><div class="ttdeci">virtual bool scheduleKernel(raft::kernel *const kernel)</div><div class="ttdef"><b>Definition:</b> poolschedule.cpp:71</div></div>
<div class="ttc" id="namespaceraft_html"><div class="ttname"><a href="namespaceraft.html">raft</a></div><div class="ttdef"><b>Definition:</b> globalmap.cpp:3</div></div>
<div class="ttc" id="classkernel__container_html"><div class="ttname"><a href="classkernel__container.html">kernel_container</a></div><div class="ttdef"><b>Definition:</b> kernelcontainer.hpp:36</div></div>
<div class="ttc" id="classpool__schedule_html"><div class="ttname"><a href="classpool__schedule.html">pool_schedule</a></div><div class="ttdef"><b>Definition:</b> poolschedule.hpp:40</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Oct 12 2015 12:16:50 for RaftLib by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html>
